package com.yyx.lgb.service.impl;

import com.yyx.lgb.mapper.UserAddressMapper;
import com.yyx.lgb.model.entity.user.UserAddress;
import com.yyx.lgb.service.UserAddressService;
import com.yyx.lgb.utils.AuthContextUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * ClassName: UserAddressServiceImpl
 * Package: com.yyx.lgb.service.impl
 * Description:
 *
 * @Author: yyx
 * @Create: 2025/8/13 - 11:34
 */
@Service
@SuppressWarnings({"unchecked", "rawtypes"})
public class UserAddressServiceImpl implements UserAddressService {

    @Autowired
    private UserAddressMapper userAddressMapper;

    @Override
    public List<UserAddress> findUserAddressList() {
        Long userId = AuthContextUtil.getUserInfo().getId();
        return userAddressMapper.findByUserId(userId);
    }
}
